#pragma once

#include "../mayashared/mayashared.h"

class Mesh
{
private:
	struct Vertex
	{
		MPoint pos;
	};

	struct Triangle
	{
		Vertex verts[3];
	};

	struct Material
	{
		std::string name;
		std::vector<Triangle> triangles;
	};
	std::map<std::string,Material*> materials;
	typedef std::map<std::string,Material*>::iterator MaterialIt;
	typedef std::map<std::string,Material*>::const_iterator ConstMaterialIt;

public:
	Mesh(){}
	Mesh(const MDagPath &meshPath,MSpace::Space space);
	~Mesh();

	void Union(const Mesh &b);

	void WriteToXml(const std::string &outFileName);
	void WriteToBinary(const std::string &outFileName);
};